<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <script src="../../../../scripts/boot.js" type="text/javascript"></script>
    <script src="../../../../../js/dateUtil.js" type="text/javascript"></script>
    <script src="../../../../../js/ase.js" type="text/javascript"></script>
    <script src="../../../../../js/aesutil.js" type="text/javascript"></script>
    <link href="demo.css" rel="stylesheet" type="text/css"/>
    <script src="../../static/scripts/boot.js" type="text/javascript"></script>
</head>
<body>
<div class="mini-splitter" style="width:100%;height:100%;">
    <div size="40%" showCollapseButton="true" style="padding:0px;">

        <div class="mini-toolbar" style="padding:2px;border-bottom:0;">
            <table style="width:100%;">
                <tr>
                    <td style="width:100%;">
                        <a class="mini-button" iconCls="icon-edit" plain="true" id="but_update" onclick="update()">修改</a>
                        <span class="separator"></span>
                        <a class="mini-button" iconCls="icon-disk_error" plain="true" id="but_getup" onclick="getup()" enabled="false">放弃</a>
                        <span class="separator"></span>
                        <a class="mini-button" iconCls="icon-add" plain="true" id="but_addRow" onclick="addRow()" enabled="false">新增表</a>
                        <span class="separator"></span>
                        <a class="mini-button" iconCls="icon-save" plain="true" id="but_saveData" onclick="saveData()" enabled="false">保存</a>
                        <span class="separator"></span>
                        <a class="mini-button" iconCls="icon-remove" plain="true" id="but_removeRow" onclick="removeRow()" enabled="false">删除</a>
                        <span class="separator"></span>
                        <a class="mini-button" iconCls="icon-reload" plain="true" id="but_reload" onclick="reloaddata()">刷新</a>
                    </td>
                </tr>
            </table>
        </div>
        <div class="mini-fit">

            <div id="datagrid1" class="mini-datagrid" style="width:100%;height:100%;" url="../../dbserver/dbinfo" onselect="gd1select"
                 idField="id" allowResize="true" pageSize="20" allowCellEdit="false" allowCellSelect="true" multiSelect="false"
                 editNextOnEnterKey="true"  editNextRowCell="true">
                <div property="columns">
                    <div type="indexcolumn"></div>
                    <div type="checkcolumn"></div>
                    <div field="cTableName" width="120" headerAlign="center" allowSort="true">表名
                        <input property="editor" class="mini-textbox" style="width:100%;" />
                    </div>
                    <div field="cExplain" width="120" headerAlign="center" allowSort="true">备注
                        <input property="editor" class="mini-textbox" style="width:100%;" />
                    </div>
                    <div field="cViewName" width="100" align="center" headerAlign="center">试图名称
                        <input property="editor" class="mini-textbox" style="width:100%;" />
                    </div>
                    <div field="cViewSql" width="100" headerAlign="center" allowSort="true">试图脚本
                        <input property="editor" class="mini-buttonedit" onbuttonclick="onButtonEdit" style="width:100%;"/>
                    </div>
                    <div type="comboboxcolumn" field="dbinfo_id" width="100" displayField="cRemark" headerAlign="center" >数据源
                        <input property="editor" displayField="cRemark" class="mini-combobox" style="width:100%;" url="../../dbserver/dbinfo?tablename=dbinfo"/>
                    </div>
                </div>

            </div>

        </div>
    </div>
    <div showCollapseButton="true">
        <div class="mini-toolbar" style="padding:2px;border-bottom:0;">
            <table style="width:100%;">
                <tr>
                    <td style="width:100%;">
                        <a class="mini-button" iconCls="icon-add" plain="true" id="but_addRow_D" onclick="addRow_D()" enabled="false">新增字段</a>
                        <span class="separator"></span>
                        <a class="mini-button" iconCls="icon-remove" plain="true" id="but_removeRow_D" onclick="removeRow_D()" enabled="false">删除字段</a>
                        <span class="separator"></span>
                    </td>
                </tr>
            </table>
        </div>
        <div class="mini-fit">
            <div id="datagrid2" class="mini-datagrid" style="width:100%;height:100%;" url="../../dbserver/dbinfo"
                 idField="id" allowResize="true" pageSize="20" allowCellEdit="false" allowCellSelect="true" multiSelect="true"
                 editNextOnEnterKey="true"  editNextRowCell="true">
                <div property="columns">
                    <div type="indexcolumn"></div>
                    <div type="checkcolumn"></div>
                    <div field="cField" width="120" headerAlign="center" allowSort="true">字段名
                        <input property="editor" class="mini-textbox" style="width:100%;" />
                    </div>
                    <div field="cExplain" width="120" headerAlign="center" allowSort="true">字段说明
                        <input property="editor" class="mini-textbox" style="width:100%;" />
                    </div>
                    <div type="comboboxcolumn" field="cType" width="120" headerAlign="center" allowSort="true" data="types">数据类型
                        <input property="editor" class="mini-combobox" style="width:100%;" data="types" />
                    </div>
                    <div field="dLength" width="100" allowSort="true" >小数位数
                        <input property="editor" class="mini-spinner"  minValue="1" maxValue="10" value="2" style="width:100%;"/>
                    </div>
                    <div type="checkboxcolumn" field="bNull" trueValue="true" falseValue="false" width="40" headerAlign="center">是否为空</div>
                    <div type="checkboxcolumn" field="bKey" trueValue="true" falseValue="false" width="40" headerAlign="center">是否主键</div>
                    <div type="checkboxcolumn" field="bAuto" trueValue="true" falseValue="false" width="40" headerAlign="center">是否自增</div>
                </div>
            </div>
        </div>
    </div>
</div>

<div id="editWindow" class="mini-window" title="试图脚本" style="width:650px;height: 500px;"
     showModal="true" allowResize="false" allowDrag="true">
    <div class="mini-toolbar" style="padding:2px;border-bottom:0;">
        <table style="width:100%;">
            <tr>
                <td style="width:100%;">
                    <a class="mini-button" iconCls="icon-exclamation" plain="true" onclick="execsql()">执行语句</a>
                    <span class="separator"></span>
                    <a class="mini-button" iconCls="icon-ok" plain="true" onclick="refok()">确定</a>
                    <span class="separator"></span>
                    <a class="mini-button" iconCls="icon-remove" plain="true" onclick="execwin()">取消</a>
                    <span class="separator"></span>
                </td>
            </tr>
        </table>

    </div>
    <textarea id="txt_sql" class="mini-textarea" emptyText="" style="width: 100%;height: 410px;"></textarea>
</div>
</body>
<script src="js/TableDesigner.js" type="text/javascript"></script>
</html>